package com.fanshilz.flower2025.framework.exception;

import cn.hutool.http.HttpStatus;
import lombok.Getter;

@Getter
public class CodeException extends BaseException {

    private final Integer errorCode;

    public CodeException(String errorMessage) {
        super(errorMessage);
        errorCode = HttpStatus.HTTP_INTERNAL_ERROR;
    }

    public CodeException() {
        super("server error");
        errorCode = HttpStatus.HTTP_INTERNAL_ERROR;
    }

    public CodeException(Integer errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
    }

}
